package com.ruoyi.supermarket.mapper;

import java.util.List;
import com.ruoyi.supermarket.domain.SupermarketComShelf;
import com.ruoyi.supermarket.domain.SupermarketCommodity;
import com.ruoyi.supermarket.domain.SupermarketShelf;
import org.apache.ibatis.annotations.Select;

/**
 * 超市货架信息Mapper接口
 * 
 * @author faye
 * @date 2024-05-28
 */
public interface SupermarketComShelfMapper 
{
    /**
     * 查询超市货架信息
     * 
     * @param storageId 超市货架信息主键
     * @return 超市货架信息
     */
    public SupermarketComShelf selectSupermarketComShelfByStorageId(Long storageId);

    @Select("select ss.* from supermarket_com_shelf scs left join supermarket_commodity sc on sc.commodity_id=scs.storage_commodity_id left join supermarket_shelf ss on ss.shelf_id=scs.shelf_id where #{commodityId}=sc.commodity_id" )
    public List<SupermarketShelf> selectShelfByComId(Long commodityId);

    /**
     * 查询超市货架信息列表
     * 
     * @param supermarketComShelf 超市货架信息
     * @return 超市货架信息集合
     */
    public List<SupermarketComShelf> selectSupermarketComShelfList(SupermarketComShelf supermarketComShelf);

    /**
     * 新增超市货架信息
     * 
     * @param supermarketComShelf 超市货架信息
     * @return 结果
     */
    public int insertSupermarketComShelf(SupermarketComShelf supermarketComShelf);

    /**
     * 修改超市货架信息
     * 
     * @param supermarketComShelf 超市货架信息
     * @return 结果
     */
    public int updateSupermarketComShelf(SupermarketComShelf supermarketComShelf);

    /**
     * 删除超市货架信息
     * 
     * @param storageId 超市货架信息主键
     * @return 结果
     */
    public int deleteSupermarketComShelfByStorageId(Long storageId);

    /**
     * 批量删除超市货架信息
     * 
     * @param storageIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSupermarketComShelfByStorageIds(Long[] storageIds);
}
